package com.sense.kukoo.biz_explore.net

import com.sense.kukoo.common.repo.bean.*
import okhttp3.RequestBody
import retrofit2.http.Body
import retrofit2.http.GET
import retrofit2.http.POST
import retrofit2.http.Path

interface ExploreHttpApi {

    /**首页配置查询 */
    @GET("/api/book/app-ui-conf/index")
    suspend fun index(): ResultBean<IndexBean>

    /**首页推荐栏数据查询 */
    @GET("/api/book/recommend/{code}")
    suspend fun recommend(@Path("code") code: String): ResultBean<List<RecommendBean>>

    /**推荐频道: code 其它频道: 二级分类ID*/
    @GET("/api/book/more/{pageIndex}/{pageSize}/{code}")
    suspend fun more(
        @Path("pageIndex") pageIndex: String,
        @Path("pageSize") pageSize: String,
        @Path("code") code: String
    ): ResultBean<QueryPageBean<BookBean>>

    /**搜索推荐*/
    @POST("/api/user/search/app/query-page/{pageIndex}/{pageSize}")
    suspend fun searchQueryPage(
        @Path("pageIndex") pageIndex: String,
        @Path("pageSize") pageSize: String
    ): ResultBean<QueryPageBean<SearchRecordBean>>

    /**搜索推荐*/
    @POST("/api/book/hot-word/query-page")
    suspend fun hotWordQueryPage(@Body requestBody: RequestBody): ResultBean<QueryPageBean<HotWordBean>>

    /**搜索*/
    @POST("/api/book/search")
    suspend fun searchBook(@Body requestBody: RequestBody): ResultBean<QueryPageBean<BookBean>>

}